package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.AutoFill;
import com.ruoyi.common.enums.AutoFillType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DispatchDataEntryMapper;
import com.ruoyi.system.domain.DispatchDataEntry;
import com.ruoyi.system.service.IDispatchDataEntryService;

/**
 * 数据填报Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-02
 */
@Service
public class DispatchDataEntryServiceImpl implements IDispatchDataEntryService 
{
    @Autowired
    private DispatchDataEntryMapper dispatchDataEntryMapper;

    /**
     * 查询数据填报
     * 
     * @param dataEntryId 数据填报主键
     * @return 数据填报
     */
    @Override
    public DispatchDataEntry selectDispatchDataEntryByDataEntryId(Long dataEntryId)
    {
        return dispatchDataEntryMapper.selectDispatchDataEntryByDataEntryId(dataEntryId);
    }

    /**
     * 查询数据填报列表
     * 
     * @param dispatchDataEntry 数据填报
     * @return 数据填报
     */
    @Override
    public List<DispatchDataEntry> selectDispatchDataEntryList(DispatchDataEntry dispatchDataEntry)
    {
        return dispatchDataEntryMapper.selectDispatchDataEntryList(dispatchDataEntry);
    }

    /**
     * 新增数据填报
     * 
     * @param dispatchDataEntry 数据填报
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.INSERT)
    @Override
    public int insertDispatchDataEntry(DispatchDataEntry dispatchDataEntry)
    {
        return dispatchDataEntryMapper.insertDispatchDataEntry(dispatchDataEntry);
    }

    /**
     * 修改数据填报
     * 
     * @param dispatchDataEntry 数据填报
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.UPDATE)
    @Override
    public int updateDispatchDataEntry(DispatchDataEntry dispatchDataEntry)
    {
        return dispatchDataEntryMapper.updateDispatchDataEntry(dispatchDataEntry);
    }

    /**
     * 批量删除数据填报
     * 
     * @param dataEntryIds 需要删除的数据填报主键
     * @return 结果
     */
    @Override
    public int deleteDispatchDataEntryByDataEntryIds(Long[] dataEntryIds)
    {
        return dispatchDataEntryMapper.deleteDispatchDataEntryByDataEntryIds(dataEntryIds);
    }

    /**
     * 删除数据填报信息
     * 
     * @param dataEntryId 数据填报主键
     * @return 结果
     */
    @Override
    public int deleteDispatchDataEntryByDataEntryId(Long dataEntryId)
    {
        return dispatchDataEntryMapper.deleteDispatchDataEntryByDataEntryId(dataEntryId);
    }
}
